$.ajax({
    url: '/bookservlet',
    dataType: 'json',
    type: 'POST',
    data: {option: 'getRecommend'},
    success: function (returnValue) {
        // alert(returnValue[0].book_name);
        // alert(returnValue.length);
        for (var i = 0; i < returnValue.length; i++) {

            var commit = returnValue[i].book_commit.slice(1, 20);
            var msg = $(" <div class=\"col   \">\n" +

                "                        <a href=\"bookservlet?option=saveid&id=" + returnValue[i].book_id + "\" class=\"mb-0 my1 \">" + returnValue[i].book_name + "</a>\n" +
                "                        <div class=\" text-muted author\">" + returnValue[i].book_author + "" +
                "                        <p class=\"desc\">" + commit + "</p>\n" +
                "</div>\n" +
                // "                        <a href=\"booksevlet?option=saveid&id="+returnValue[i].book_id +"\" class=\"stretched-link\"></a>\n" +
                "                    </div>")

            var image = $("                    <div class=\"col-lg-7\">\n" +
                "                        <img style='width:100%' " +
                "                             src=" + returnValue[i].book_picaddress + " " +
                "                             alt=\"...\" href=\"/bookMsg.html\">\n" +
                "                    </div>");
            var d1 = $(" <div class=\"row  \">");
            d1.append(image);
            d1.append(msg);


            var d2 = $(" <div class=\"col-lg-2     \">")
            d2.append(d1);
            $("#comit").append(d2);


        }


    }
})